﻿namespace YKXiangQi.Common
{
    public class Constant
    {
        public const int BoardLargeWidth = 572;
        public const int BoardLargeHeight = 626;
        public const int PieceLargeSize = 54;
        public const int PieceMaskLargeSize = 55;
        public const int PieceCollapsedModeLargeSize = 34;
        public const int BoardMediumWidth = 432;
        public const int BoardMediumHeight = 472;
        public const int PieceMediumSize = 40;
        public const int PieceMaskMediumSize = 42;
        public const int PieceCollapsedModeMediumSize = 26;
        public const int BoardSmallWidth = 292;
        public const int BoardSmallHeight = 319;
        public const int PieceSmallSize = 26;
        public const int PieceMaskSmallSize = 27;
        public const int PieceCollapsedSmallSize = 26;
        public const int BoardLargeOffset = 70;
        public const int BoardMediumOffset = 53;
        public const int BoardSmallOffset = 34;
        public const int BoardCellLargeSize = 54;
        public const int BoardCellMediumSize = 41;
        public const int BoardCellSmallSize = 28;
        public const string DefaultFen = "rheakaehr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RHEAKAEHR w";
        public const string EmptyFen = "3k5/9/9/9/9/9/9/9/9/4K4 w";
        public const string King = "King";
        public const string Advisor = "Advisor";
        public const string Elephant = "Elephant";
        public const string Horse = "Horse";
        public const string Rook = "Rook";
        public const string Pawn = "Pawn";
        public const string Cannon = "Cannon";
        public const int WaitTimeout = 10000;
        public const double ThinkingMoveLargeSize = 17;
        public const double ThinkingMoveMediumSize = 13;
        public const double ThingkingMoveSmallSize = 9;

        public class Commands
        {
            public const string Clear = "clear";
            public const string IsReady = "isready";
            public const string SetOption = "setoption name {0} value {1}";
            public const string Fen = "fen {0}";
            public const string Position = "position fen {0}";
            public const string Go = "go";
            public const string Stop = "stop";
            public const string Quit = "quit";
            public const string PonderHit = "ponderhit";
            public const string Uci = "uci";
            public const string Ucci = "ucci";
            public const string UciNewGame = "ucinewgame";
            
            public class Parameters
            {
                public const string StartPosition = "startpos";
                public const string SearchMoves = "searchmoves {0}";
                public const string Ponder = "ponder";
                public const string WTime = "wtime {0}";
                public const string BTime = "btime {0}";
                public const string WInc = "winc {0}";
                public const string BInc = "binc {0}";
                public const string MovesToGo = "movestogo {0}";
                public const string Depth = "depth {0}";
                public const string Nodes = "nodes {0}";
                public const string Mate = "mate {0}";
                public const string MoveTime = "movetime {0}";
                public const string Infinite = "infinite";
            }
        }

        public class FeedBacks
        {
            public const string UciOk = "uciok";
            public const string UcciOk = "ucciok";
            public const string ReadyOk = "readyok";
            public const string Id = "id";
            public const string BestMove = "bestmove";
            public const string Info = "info";
            public const string Option = "option";

            public class Paramters
            {
                public const string Name = "name";
                public const string Author = "author";
                public const string Ponder = "ponder";
                public const string Depth = "depth";//search depth in plies
                public const string SelectiveDepth = "seldepth"; //selective search depth in plies
                public const string Time = "time";//the time searched(ms)
                public const string Nodes = "nodes"; //x nodes searched
                public const string Pv = "pv"; //the best line found
                public const string MultiPv = "multipv";
                public const string Score = "score";
                public const string ScoreCp = "cp";
                public const string ScoreMate = "mate";
                public const string ScoreLowerBound = "lowerbound";
                public const string ScoreUpperBound = "upperbound";
                public const string Nps = "nps";
                public const string CurrentMove = "currmove";
                public const string CurrentMoveNumber = "currmovenumber";
            }
        }
    }
}
